﻿using Dapper.Contrib.Extensions;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
#nullable disable

namespace Tauren.Business.Entity.Input
{
    public class Permission_Input
    {
        public Permission_Input()
        {
            ChildFieldValues = new List<PermissionRes_InPut>();
            Childs = new List<ButtonsPermission_Input>();
        }

        public virtual long AutoId { get; set; }
        /// <summary>
        /// 按钮编码
        /// </summary>
        [Display(Name = "权限编码"), Required(ErrorMessage = "{0}不能为空!"), StringLength(20, ErrorMessage = "{0}不超过30个字符"), RegularExpression(@"^([a-zA-Z0-9]){1,30}$", ErrorMessage = "请输入小写英文字符、数字组成的{0}")]

        public virtual string PerCode { get; set; }
        public virtual bool Enable { get; set; }
        public virtual bool HaveDelete { get; set; }
        public virtual double? Sequence { get; set; }

        public virtual List<PermissionRes_InPut> ChildFieldValues { get; set; }
        public virtual List<ButtonsPermission_Input> Childs { get; set; }
    }
}
